//
//  VCItemTools.m
//  VideoCollage
//
//  Created by Mac on 2018/6/22.
//  Copyright © 2018年 stoneobs.qq.com. All rights reserved.
//

#import "VCItemTools.h"

@implementation VCItemTools
+ (NSArray<VCItemFrameModel *> *)frameWithRank:(NSInteger)rank itemInset:(CGFloat)itemInset superSize:(CGSize)superSize{
    
    NSString * funName = [NSString stringWithFormat:@"frameWithRank%ldItemInset:superSize:",rank];
    NSArray * array = [VCItemTools.class performSelector:NSSelectorFromString(funName) withObject:@(itemInset) withObject:NSStringFromCGSize(superSize)];
    return array;

}
#pragma mark --每个布局
+ (NSArray<VCItemFrameModel *> *)frameWithRank1ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = (faterWitdh - 2 * itemInset.floatValue)/faterWitdh;
    model.scaleHeight = (faterHeight - 2 * itemInset.floatValue)/faterHeight;
    model.center = CGPointMake(faterWitdh/2, faterHeight/2);
    model.itemInset = itemInset.floatValue;
    
    [array addObject:model];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank2ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 3 *itemInset.floatValue )/2 ;
    CGFloat itemHeight = (faterHeight - 2 *itemInset.floatValue ) ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = itemWith /faterWitdh ;
    model.scaleHeight = itemHeight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    
    model1.center = CGPointMake(faterWitdh - itemInset.floatValue - itemWith/2, itemInset.floatValue +  itemHeight/2);
    model1.itemInset = itemInset.floatValue;
    
    [array addObject:model];
    [array addObject:model1];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank3ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 4 *itemInset.floatValue )/3 ;
    CGFloat itemHeight = (faterHeight - 2 *itemInset.floatValue ) ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = itemWith /faterWitdh ;
    model.scaleHeight = itemHeight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    
    model1.center = CGPointMake(model.center.x + itemWith + itemInset.floatValue, itemInset.floatValue +  itemHeight/2);
    model1.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model3 =  VCItemFrameModel.new;
    model3.scaleWitdh = itemWith /faterWitdh ;
    model3.scaleHeight = itemHeight /faterHeight ;
    
    model3.center = CGPointMake(model1.center.x + itemWith + itemInset.floatValue, itemInset.floatValue +  itemHeight/2);
    model3.itemInset = itemInset.floatValue;
    
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:model3];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank4ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    
    CGFloat itemWith = (faterWitdh - 3 *itemInset.floatValue )/3 ;
    CGFloat itemHeight = (faterHeight - 2 *itemInset.floatValue ) ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = 2*itemWith /faterWitdh ;
    model.scaleHeight = itemHeight / faterHeight ;
    model.center = CGPointMake(itemWith + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    
    model1.center = CGPointMake(model.center.x + 1.5 * itemWith + itemInset.floatValue, itemInset.floatValue +  itemHeight/2);
    model1.itemInset = itemInset.floatValue;
    
    [array addObject:model];
    [array addObject:model1];

    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank5ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 2 *itemInset.floatValue )/1 ;
    CGFloat itemHeight = (faterHeight - 3 *itemInset.floatValue )/2 ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = itemWith /faterWitdh ;
    model.scaleHeight = itemHeight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    
    model1.center = CGPointMake(itemWith/2 + itemInset.floatValue, itemInset.floatValue +  itemHeight + model.center.y);
    model1.itemInset = itemInset.floatValue;
    
    [array addObject:model];
    [array addObject:model1];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank6ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 2 *itemInset.floatValue )/1 ;
    CGFloat itemHeight = (faterHeight - 3 *itemInset.floatValue )/3 ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = 1 * itemWith /faterWitdh ;
    model.scaleHeight = 2 * itemHeight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    
    model1.center = CGPointMake(itemWith/2 + itemInset.floatValue, itemInset.floatValue +  1.5*itemHeight + model.center.y);
    model1.itemInset = itemInset.floatValue;
    
    [array addObject:model];
    [array addObject:model1];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank7ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    
    CGFloat itemWith = (faterWitdh - 2 *itemInset.floatValue )/1 ;
    CGFloat itemHeight = (faterHeight - 4 *itemInset.floatValue )/3 ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = 1 * itemWith /faterWitdh ;
    model.scaleHeight = 1 * itemHeight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    model1.center = CGPointMake(itemWith/2 + itemInset.floatValue, itemInset.floatValue +  1*itemHeight + model.center.y);
    model1.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model2 =  VCItemFrameModel.new;
    model2.scaleWitdh = itemWith /faterWitdh ;
    model2.scaleHeight = itemHeight /faterHeight ;
    model2.center = CGPointMake(itemWith/2 + itemInset.floatValue, itemInset.floatValue +  1*itemHeight + model1.center.y);
    model2.itemInset = itemInset.floatValue;
    
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:model2];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank8ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith1 = (faterWitdh - 2 *itemInset.floatValue )/1 ;
    CGFloat itemHeight1 = (faterHeight - 3 *itemInset.floatValue )/3 ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = 1 * itemWith1 /faterWitdh ;
    model.scaleHeight = 1 * itemHeight1 / faterHeight ;
    model.center = CGPointMake(itemWith1/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight1/2);
    model.itemInset = itemInset.floatValue;
    
    
    CGFloat itemWith2 = (faterWitdh - 3 *itemInset.floatValue )/2 ;
    CGFloat itemHeight2 = 2 *(faterHeight - 3 *itemInset.floatValue )/3 ;
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith2 /faterWitdh ;
    model1.scaleHeight = itemHeight2 /faterHeight ;
    model1.center = CGPointMake(itemWith2/2 + itemInset.floatValue, faterHeight - itemInset.floatValue - itemHeight2 / 2);
    model1.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model2 =  VCItemFrameModel.new;
    model2.scaleWitdh = itemWith2 /faterWitdh ;
    model2.scaleHeight = itemHeight2 /faterHeight ;
    model2.center = CGPointMake(model1.center.x +  itemInset.floatValue + itemWith2, model1.center.y);
    model2.itemInset = itemInset.floatValue;
    
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:model2];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank9ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith1 = (faterWitdh - 3 *itemInset.floatValue )/2 ;
    CGFloat itemHeight1 = 2 * (faterHeight - 3 *itemInset.floatValue )/3 ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = 1 * itemWith1 /faterWitdh ;
    model.scaleHeight = 1 * itemHeight1 / faterHeight ;
    model.center = CGPointMake(itemWith1/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight1/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith1 /faterWitdh ;
    model1.scaleHeight = itemHeight1 /faterHeight ;
    model1.center = CGPointMake(itemWith1 + itemInset.floatValue + model.center.x, model.center.y);
    model1.itemInset = itemInset.floatValue;
    
    
    CGFloat itemWith2 = (faterWitdh - 2 *itemInset.floatValue )/1 ;
    CGFloat itemHeight2 = 1 *(faterHeight - 3 *itemInset.floatValue )/3 ;
    VCItemFrameModel * model2 =  VCItemFrameModel.new;
    model2.scaleWitdh = itemWith2 /faterWitdh ;
    model2.scaleHeight = itemHeight2 /faterHeight ;
    model2.center = CGPointMake(itemWith2/2 +  itemInset.floatValue , faterHeight - itemInset.floatValue - itemHeight2 /2);
    model2.itemInset = itemInset.floatValue;
    
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:model2];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank10ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 3 *itemInset.floatValue )/2 ;
    CGFloat itemHeight = (faterHeight - 3 *itemInset.floatValue )/2 ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = itemWith /faterWitdh ;
    model.scaleHeight = itemHeight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    model1.center = CGPointMake(model.center.x + itemInset.floatValue + itemWith, model.center.y);
    model1.itemInset = itemInset.floatValue;
    
    

    VCItemFrameModel * mode2 =  VCItemFrameModel.new;
    mode2.scaleWitdh = itemWith /faterWitdh ;
    mode2.scaleHeight = itemHeight / faterHeight ;
    mode2.center = CGPointMake(model.center.x ,faterHeight - itemInset.floatValue - itemHeight / 2);
    mode2.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * mode3 =  VCItemFrameModel.new;
    mode3.scaleWitdh = itemWith /faterWitdh ;
    mode3.scaleHeight = itemHeight / faterHeight ;
    mode3.center = CGPointMake(model1.center.x ,mode2.center.y);
    mode3.itemInset = itemInset.floatValue;
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:mode2];
    [array addObject:mode3];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank11ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 3 *itemInset.floatValue )/3 ;
    CGFloat itemHeight = (faterHeight - 4.0 *itemInset.floatValue )/3 ;
    
     CGFloat bigheight = (faterHeight - 2 *itemInset.floatValue )/1 ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = 1 * itemWith /faterWitdh ;
    model.scaleHeight = bigheight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  bigheight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = 2 * itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    model1.center = CGPointMake(faterWitdh - itemInset.floatValue - itemWith, itemInset.floatValue +  itemHeight *0.5);
    model1.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model2 =  VCItemFrameModel.new;
    model2.scaleWitdh = 2 * itemWith /faterWitdh ;
    model2.scaleHeight = itemHeight /faterHeight ;
    model2.center = CGPointMake(model1.center.x, itemInset.floatValue +  model1.center.y + itemHeight);
    model2.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model3 =  VCItemFrameModel.new;
    model3.scaleWitdh = 2 * itemWith /faterWitdh ;
    model3.scaleHeight = itemHeight /faterHeight  ;
    model3.center = CGPointMake(model1.center.x, itemInset.floatValue +  model2.center.y + itemHeight);
    model3.itemInset = itemInset.floatValue;
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:model2];
    [array addObject:model3];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank12ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 3 *itemInset.floatValue )/3 ;
    CGFloat itemHeight = (faterHeight - 4.0 *itemInset.floatValue )/3 ;
    
    CGFloat bigheight = (faterHeight - 2 *itemInset.floatValue )/1 ;
    

    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = 2 * itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    model1.center = CGPointMake( itemInset.floatValue + itemWith, itemInset.floatValue +  itemHeight *0.5);
    model1.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model4 =  VCItemFrameModel.new;
    model4.scaleWitdh = 1 * itemWith /faterWitdh ;
    model4.scaleHeight = bigheight / faterHeight ;
    model4.center = CGPointMake(itemWith * 2 + 2 * itemInset.floatValue + 0.5 * itemWith ,itemInset.floatValue +  bigheight/2);
    model4.itemInset = itemInset.floatValue;
    
    
    
    VCItemFrameModel * model2 =  VCItemFrameModel.new;
    model2.scaleWitdh = 2 * itemWith /faterWitdh ;
    model2.scaleHeight = itemHeight /faterHeight ;
    model2.center = CGPointMake(model1.center.x, itemInset.floatValue +  model1.center.y + itemHeight);
    model2.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model3 =  VCItemFrameModel.new;
    model3.scaleWitdh = 2 * itemWith /faterWitdh ;
    model3.scaleHeight = itemHeight /faterHeight  ;
    model3.center = CGPointMake(model1.center.x, itemInset.floatValue +  model2.center.y + itemHeight);
    model3.itemInset = itemInset.floatValue;
    
    

    
    
    [array addObject:model1];
    [array addObject:model4];
    [array addObject:model2];
    [array addObject:model3];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank13ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 3 *itemInset.floatValue )/2 ;
    CGFloat itemHeight = (faterHeight - 4 *itemInset.floatValue )/3 ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = itemWith /faterWitdh ;
    model.scaleHeight = itemHeight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    model1.center = CGPointMake(model.center.x + itemInset.floatValue + itemWith, model.center.y);
    model1.itemInset = itemInset.floatValue;
    
    
    
    VCItemFrameModel * mode2 =  VCItemFrameModel.new;
    mode2.scaleWitdh = itemWith /faterWitdh ;
    mode2.scaleHeight = itemHeight / faterHeight ;
    mode2.center = CGPointMake(model.center.x ,model.center.y + itemHeight + itemInset.floatValue);
    mode2.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * mode3 =  VCItemFrameModel.new;
    mode3.scaleWitdh = itemWith /faterWitdh ;
    mode3.scaleHeight = itemHeight / faterHeight ;
    mode3.center = CGPointMake(model1.center.x ,mode2.center.y);
    mode3.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * mode4 =  VCItemFrameModel.new;
    mode4.scaleWitdh = itemWith /faterWitdh ;
    mode4.scaleHeight = itemHeight / faterHeight ;
    mode4.center = CGPointMake(model.center.x ,mode2.center.y + itemHeight + itemInset.floatValue);
    mode4.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * mode5 =  VCItemFrameModel.new;
    mode5.scaleWitdh = itemWith /faterWitdh ;
    mode5.scaleHeight = itemHeight / faterHeight ;
    mode5.center = CGPointMake(model1.center.x ,mode4.center.y);
    mode5.itemInset = itemInset.floatValue;
    
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:mode2];
    [array addObject:mode3];
    [array addObject:mode4];
    [array addObject:mode5];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank14ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 3 *itemInset.floatValue )/2 ;
    CGFloat itemHeight = (faterHeight - 4 *itemInset.floatValue )/3 ;
    
    CGFloat itemBigHeight = itemHeight * 2 + itemInset.floatValue ;
    
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = itemWith /faterWitdh ;
    model.scaleHeight = itemHeight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemBigHeight /faterHeight ;
    model1.center = CGPointMake(model.center.x + itemInset.floatValue + itemWith, itemInset.floatValue + 0.5 * itemBigHeight);
    model1.itemInset = itemInset.floatValue;
    
    
    
    VCItemFrameModel * mode2 =  VCItemFrameModel.new;
    mode2.scaleWitdh = itemWith /faterWitdh ;
    mode2.scaleHeight = itemHeight / faterHeight ;
    mode2.center = CGPointMake(model.center.x ,model.center.y + itemHeight + itemInset.floatValue);
    mode2.itemInset = itemInset.floatValue;
    
    
    
    
    VCItemFrameModel * mode4 =  VCItemFrameModel.new;
    mode4.scaleWitdh = itemWith /faterWitdh ;
    mode4.scaleHeight = itemHeight / faterHeight ;
    mode4.center = CGPointMake(model.center.x ,mode2.center.y + itemHeight + itemInset.floatValue);
    mode4.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * mode5 =  VCItemFrameModel.new;
    mode5.scaleWitdh = itemWith /faterWitdh ;
    mode5.scaleHeight = itemHeight / faterHeight ;
    mode5.center = CGPointMake(model1.center.x ,mode4.center.y);
    mode5.itemInset = itemInset.floatValue;
    
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:mode2];
    [array addObject:mode4];
    [array addObject:mode5];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank15ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 3 *itemInset.floatValue )/2 ;
    CGFloat itemHeight = (faterHeight - 4 *itemInset.floatValue )/3 ;
    
    CGFloat itemBigHeight = itemHeight * 2 + itemInset.floatValue ;
    CGFloat itemBigWidth = itemWith * 2 + itemInset.floatValue ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = itemWith /faterWitdh ;
    model.scaleHeight = itemHeight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemBigHeight /faterHeight ;
    model1.center = CGPointMake(model.center.x + itemInset.floatValue + itemWith, itemInset.floatValue + 0.5 * itemBigHeight);
    model1.itemInset = itemInset.floatValue;
    
    
    
    VCItemFrameModel * mode2 =  VCItemFrameModel.new;
    mode2.scaleWitdh = itemWith /faterWitdh ;
    mode2.scaleHeight = itemHeight / faterHeight ;
    mode2.center = CGPointMake(model.center.x ,model.center.y + itemHeight + itemInset.floatValue);
    mode2.itemInset = itemInset.floatValue;
    
    
    
    
    VCItemFrameModel * mode4 =  VCItemFrameModel.new;
    mode4.scaleWitdh = itemBigWidth /faterWitdh ;
    mode4.scaleHeight = itemHeight / faterHeight ;
    mode4.center = CGPointMake(itemBigWidth/2 + itemInset.floatValue ,mode2.center.y + itemHeight + itemInset.floatValue);
    mode4.itemInset = itemInset.floatValue;
    

    
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:mode2];
    [array addObject:mode4];

    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank16ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 3 *itemInset.floatValue )/2 ;
    CGFloat itemHeight = (faterHeight - 3 *itemInset.floatValue )/3 ;
    
    CGFloat itemBigHeight = itemHeight * 2  ;

    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = itemWith /faterWitdh ;
    model.scaleHeight = itemBigHeight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  itemBigHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    model1.center = CGPointMake(model.center.x + itemInset.floatValue + itemWith, itemInset.floatValue + 0.5 * itemHeight);
    model1.itemInset = itemInset.floatValue;
    
    
    
    VCItemFrameModel * mode2 =  VCItemFrameModel.new;
    mode2.scaleWitdh = itemWith /faterWitdh ;
    mode2.scaleHeight = itemHeight / faterHeight ;
    mode2.center = CGPointMake(model.center.x ,faterHeight - itemHeight/2 - itemInset.floatValue);
    mode2.itemInset = itemInset.floatValue;
    
    
    
    
    VCItemFrameModel * mode4 =  VCItemFrameModel.new;
    mode4.scaleWitdh = itemWith /faterWitdh ;
    mode4.scaleHeight = itemBigHeight / faterHeight ;
    mode4.center = CGPointMake(model1.center.x ,faterHeight - itemBigHeight/2 - itemInset.floatValue);
    mode4.itemInset = itemInset.floatValue;
    
    
    
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:mode2];
    [array addObject:mode4];
    
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank17ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 4 *itemInset.floatValue )/3 ;
    CGFloat itemHeight = (faterHeight - 3 *itemInset.floatValue )/2 ;
    
    CGFloat itemBigWidth = (faterWitdh - 3 *itemInset.floatValue )/2 ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = itemBigWidth /faterWitdh ;
    model.scaleHeight = itemHeight / faterHeight ;
    model.center = CGPointMake(itemBigWidth/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemBigWidth /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    model1.center = CGPointMake(model.center.x + itemInset.floatValue + itemBigWidth, model.center.y);
    model1.itemInset = itemInset.floatValue;
    
    
    
    VCItemFrameModel * mode2 =  VCItemFrameModel.new;
    mode2.scaleWitdh = itemWith /faterWitdh ;
    mode2.scaleHeight = itemHeight / faterHeight ;
    mode2.center = CGPointMake(0.5 * itemWith + itemInset.floatValue ,faterHeight - itemHeight/2 - itemInset.floatValue);
    mode2.itemInset = itemInset.floatValue;
    
    
    
    
    VCItemFrameModel * mode3 =  VCItemFrameModel.new;
    mode3.scaleWitdh = itemWith /faterWitdh ;
    mode3.scaleHeight = itemHeight / faterHeight ;
    mode3.center = CGPointMake(mode2.center.x + itemWith + itemInset.floatValue ,mode2.center.y);
    mode3.itemInset = itemInset.floatValue;
    
    VCItemFrameModel * mode4 =  VCItemFrameModel.new;
    mode4.scaleWitdh = itemWith /faterWitdh ;
    mode4.scaleHeight = itemHeight / faterHeight ;
    mode4.center = CGPointMake(mode3.center.x + itemWith + itemInset.floatValue ,mode2.center.y);
    mode4.itemInset = itemInset.floatValue;
    
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:mode2];
    [array addObject:mode3];
    [array addObject:mode4];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank18ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 4 *itemInset.floatValue )/3 ;
    CGFloat itemHeight = (faterHeight - 2 *itemInset.floatValue )/3 ;
    
    CGFloat itemBigHeight = 2 * (faterHeight - 3 *itemInset.floatValue )/3 ;
    CGFloat itemMaxHeight = faterHeight - 2 *itemInset.floatValue ;
    
    CGFloat itemBigWitdh = 2 * (faterWitdh - 2 *itemInset.floatValue )/3 ;

    
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = itemBigWitdh /faterWitdh ;
    model.scaleHeight = itemHeight / faterHeight ;
    model.center = CGPointMake(itemBigWitdh/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemMaxHeight /faterHeight ;
    model1.center = CGPointMake(faterWitdh - itemWith/2 - itemInset.floatValue, itemInset.floatValue + 0.5 * itemMaxHeight);
    model1.itemInset = itemInset.floatValue;
    
    
    
    VCItemFrameModel * mode2 =  VCItemFrameModel.new;
    mode2.scaleWitdh = itemWith /faterWitdh ;
    mode2.scaleHeight = itemBigHeight / faterHeight ;
    mode2.center = CGPointMake(0.5 * itemWith + itemInset.floatValue ,faterHeight - itemBigHeight/2 - itemInset.floatValue);
    mode2.itemInset = itemInset.floatValue;
    
    
    
    
    VCItemFrameModel * mode3 =  VCItemFrameModel.new;
    mode3.scaleWitdh = itemWith /faterWitdh ;
    mode3.scaleHeight = itemBigHeight / faterHeight ;
    mode3.center = CGPointMake(mode2.center.x + itemWith + itemInset.floatValue ,mode2.center.y);
    mode3.itemInset = itemInset.floatValue;
    

    
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:mode2];
    [array addObject:mode3];

    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank19ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 3 *itemInset.floatValue )/2 ;
    CGFloat itemHeight = (faterHeight - 4 *itemInset.floatValue )/3 ;
    
    CGFloat itemBigHeight = 2 * itemHeight + itemInset.floatValue ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = itemWith /faterWitdh ;
    model.scaleHeight = itemHeight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    model1.center = CGPointMake(model.center.x + itemInset.floatValue + itemWith, model.center.y);
    model1.itemInset = itemInset.floatValue;
    
    
    
    VCItemFrameModel * mode2 =  VCItemFrameModel.new;
    mode2.scaleWitdh = itemWith /faterWitdh ;
    mode2.scaleHeight = itemBigHeight / faterHeight ;
    mode2.center = CGPointMake(model.center.x ,faterHeight - itemBigHeight/2 - itemInset.floatValue);
    mode2.itemInset = itemInset.floatValue;
    
    
    
    
    VCItemFrameModel * mode3 =  VCItemFrameModel.new;
    mode3.scaleWitdh = itemWith /faterWitdh ;
    mode3.scaleHeight = itemHeight / faterHeight ;
    mode3.center = CGPointMake(model1.center.x ,model1.center.y + itemHeight + itemInset.floatValue);
    mode3.itemInset = itemInset.floatValue;
    
    VCItemFrameModel * mode4 =  VCItemFrameModel.new;
    mode4.scaleWitdh = itemWith /faterWitdh ;
    mode4.scaleHeight = itemHeight / faterHeight ;
    mode4.center = CGPointMake(model1.center.x  ,mode3.center.y +  itemHeight + itemInset.floatValue);
    mode4.itemInset = itemInset.floatValue;
    
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:mode2];
    [array addObject:mode3];
    [array addObject:mode4];
    return array;
}
+ (NSArray<VCItemFrameModel *> *)frameWithRank20ItemInset:(NSNumber*)itemInset superSize:(NSString*)superSize{
    NSMutableArray * array = NSMutableArray.new;
    CGSize size = CGSizeFromString(superSize);
    CGFloat faterWitdh = size.width;
    CGFloat faterHeight = size.height;
    
    CGFloat itemWith = (faterWitdh - 4 *itemInset.floatValue )/3 ;
    CGFloat itemHeight = (faterHeight - 3 *itemInset.floatValue )/2 ;
    
    CGFloat itemBigWitdh = 2 * itemWith + itemInset.floatValue ;
    
    VCItemFrameModel * model =  VCItemFrameModel.new;
    model.scaleWitdh = itemWith /faterWitdh ;
    model.scaleHeight = itemHeight / faterHeight ;
    model.center = CGPointMake(itemWith/2 + itemInset.floatValue ,itemInset.floatValue +  itemHeight/2);
    model.itemInset = itemInset.floatValue;
    
    
    VCItemFrameModel * model1 =  VCItemFrameModel.new;
    model1.scaleWitdh = itemWith /faterWitdh ;
    model1.scaleHeight = itemHeight /faterHeight ;
    model1.center = CGPointMake(model.center.x + itemInset.floatValue + itemWith, model.center.y);
    model1.itemInset = itemInset.floatValue;
    
    
    
    VCItemFrameModel * mode2 =  VCItemFrameModel.new;
    mode2.scaleWitdh = itemWith /faterWitdh ;
    mode2.scaleHeight = itemHeight /faterHeight ;
    mode2.center = CGPointMake(model1.center.x + itemInset.floatValue + itemWith, model.center.y);
    mode2.itemInset = itemInset.floatValue;
    
    
    
    
    VCItemFrameModel * mode3 =  VCItemFrameModel.new;
    mode3.scaleWitdh = itemWith /faterWitdh ;
    mode3.scaleHeight = itemHeight / faterHeight ;
    mode3.center = CGPointMake(model.center.x ,model.center.y + itemHeight + itemInset.floatValue);
    mode3.itemInset = itemInset.floatValue;
    
    VCItemFrameModel * mode4 =  VCItemFrameModel.new;
    mode4.scaleWitdh = itemBigWitdh /faterWitdh ;
    mode4.scaleHeight = itemHeight / faterHeight ;
    mode4.center = CGPointMake(faterWitdh - 0.5 * itemBigWitdh - itemInset.floatValue  ,mode3.center.y);
    mode4.itemInset = itemInset.floatValue;
    
    
    [array addObject:model];
    [array addObject:model1];
    [array addObject:mode2];
    [array addObject:mode3];
    [array addObject:mode4];
    return array;
}
#pragma mark --分割线 所有size 数组
+ (NSArray<VCItemSizeModel *> *)allSizeArray{
    NSMutableArray * sizeArray = NSMutableArray.new;
    NSArray * dicArray = @[
                            @{@"size":NSStringFromCGSize(CGSizeMake(40, 40)),@"bili":@"1:1"},
                            @{@"size":NSStringFromCGSize(CGSizeMake(40, 50)),@"bili":@"4:5"},
                            @{@"size":NSStringFromCGSize(CGSizeMake(40, 30)),@"bili":@"4:3"},
                            @{@"size":NSStringFromCGSize(CGSizeMake(40, 20)),@"bili":@"2:1"},
                            @{@"size":NSStringFromCGSize(CGSizeMake(50, 70)),@"bili":@"5:7"},
                            @{@"size":NSStringFromCGSize(CGSizeMake(70, 40)),@"bili":@"7:4"},
                            @{@"size":NSStringFromCGSize(CGSizeMake(30, 20)),@"bili":@"3:2"},
                            @{@"size":NSStringFromCGSize(CGSizeMake(50, 30)),@"bili":@"5:3"},
                            @{@"size":NSStringFromCGSize(CGSizeMake(80, 45)),@"bili":@"16:9"},
                            @{@"size":NSStringFromCGSize(CGSizeMake(30, 40)),@"bili":@"3:4"},
                             @{@"size":NSStringFromCGSize(CGSizeMake(40, 60)),@"bili":@"2:3"},
                             @{@"size":NSStringFromCGSize(CGSizeMake(30, 50)),@"bili":@"3:5"},
                             @{@"size":NSStringFromCGSize(CGSizeMake(45, 80)),@"bili":@"9:16"}
                            ];
    for (NSInteger i = 0; i < dicArray.count; i ++) {
        NSDictionary * dic = dicArray[i];
        VCItemSizeModel * model = [VCItemSizeModel new];
        model.index = i;
        model.size = CGSizeFromString(dic[@"size"]);
        model.bili = dic[@"bili"];
        [sizeArray addObject:model];
    }
    return sizeArray.copy;
}
+ (VCItemSizeModel *)defultSizeModel{
    VCItemSizeModel * model = VCItemSizeModel.new;
    model.index = 0;
    model.size = CGSizeMake(40, 40);
    model.bili = @"1:1";
    model.insetValue = 10;
    model.cornerRadius = 4;
    return model;
    
}
@end
